From: Brion Vibber Date: Fri, 9 Apr 2004 10:46:28 +0000 (+0000) Subject: Un-break large number of actions. Timwi, please read http://www.php.net/switch X-Git-Tag: 1.3.0beta1~527 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=e77f54f65bede639b5680b020bea5af99f8402f6;p=lhc%2Fweb%2Fwiklou.git Un-break large number of actions. Timwi, please read php.net/switch --- diff --git a/index.php b/index.php index 608bbaca91..6a811df6a5 100644 --- a/index.php +++ b/index.php @@ -103,7 +103,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { case "rollback": case "protect": case "unprotect": - $wgArticle->unprotect(); + $wgArticle->$action(); break; case "print": $wgArticle->view(); @@ -131,7 +131,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { } include_once( "EditPage.php" ); $editor = new EditPage( $wgArticle ); - $editor->submit(); + $editor->$action(); break; case "history": if ($_SERVER["REQUEST_URI"] == $wgTitle->getInternalURL('action=history')) {